param(
    [string]$FolderName
)

# 检查参数是否为空
if (-not $FolderName) {
    Write-Host "Usage: ./CreateFiles.ps1 <FolderName>"
    exit
}

# 创建文件夹
New-Item -Path $FolderName -ItemType Directory -Force

# 在文件夹中创建 .cpp 文件
New-Item -Path "$FolderName\$FolderName.cpp" -ItemType File

# 在文件夹中创建 .md 文件
New-Item -Path "$FolderName\$FolderName.md" -ItemType File

Write-Host "Files created successfully in folder $FolderName."

